<?
if (isset($_POST['Gui']) ==true) {
	$urltin="http://www.xxx.webdoanhnghiep.org/webtintuccuateo/noidungtin.php?idTin=".$_GET['idTin'];
	$tennguoigui=$_POST['tennguoigui'];
	$from = $_POST['emailnguoigui'];
	$tennguoinhan=$_POST['tennguoinhan'];
	$to = $_POST['emailnguoinhan'];
	$subject = 'Thông tin từ xxx.webdoanhnghiep.org';
	$loinhan=$_POST['loinhan'];
	$message = "Gửi bạn $tennguoinhan!<br> $tennguoigui gửi cho bạn tin này: <br> $urltin <br> Với lời nhắn: <br>$loinhan.";
	$header = "Content-type: text/html; charset=utf-8\r\nFrom: $from\r\nReply-to: $from";
	if ( mail($to, $subject, $message, $header) ) header("location:guixong.php");
	else header("location:guichuaxong.php");
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Gửi tin cho bạn</title>
<style type="text/css">
<!--
body {
	font-weight: normal;
	color: #CCFF33;
}
.abc {
	font-family: "Times New Roman", Times, serif;
	font-size: 14px;
	color: #0066CC;
	background-color: #99CCFF;
	width: 350px;
	padding-top: 2px;
	padding-bottom: 2px;
}
-->
</style>
<link href="../c1.css" rel="stylesheet" type="text/css" />
</head>

<body>
<form id="form1" name="form1" method="post" action="">
  <table width="500" border="0" align="center" cellpadding="4" cellspacing="0" bgcolor="#996666">
    <tr>
      <td colspan="2" align="center"><strong>GỬI TIN CHO BẠN BÈ</strong></td>
    </tr>
    <tr>
      <td width="145">Tên của bạn</td>
      <td width="333"><label>
        <input name="tennguoigui" type="text" class="abc" id="tennguoigui" />
      </label></td>
    </tr>
    <tr>
      <td>Email của bạn</td>
      <td><label>
        <input name="emailnguoigui" type="text" class="abc" id="emailnguoigui" />
      </label></td>
    </tr>
    <tr>
      <td>Tên người nhận</td>
      <td><label>
        <input name="tennguoinhan" type="text" class="abc" id="tennguoinhan" />
      </label></td>
    </tr>
    <tr>
      <td>Email người nhận</td>
      <td><label>
        <input name="emailnguoinhan" type="text" class="abc" id="emailnguoinhan" />
      </label></td>
    </tr>
    <tr>
      <td>Lời nhắn</td>
      <td><label>
        <textarea name="loinhan" cols="45" rows="5" class="abc" id="loinhan"></textarea>
      </label></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><label>
        <input type="submit" name="nutgui" id="nutgui" value="  Gửi  " />
        <input type="reset" name="xoa" id="xoa" value="  Xóa  " />
      </label></td>
    </tr>
  </table>
</form>

  <p>&nbsp;</p>
</body>
</html>